2.1 Which of the following are legal identifiers? Why? Greeting1 g void 104IT IT104 Hello, World Hello3World 2.2 Construct a logical expression to represent each of the following conditions: a. x...
2.1 Which of the following are legal identifiers? Why?
Greeting1 | g | void | 104IT | IT104 |
Hello, World
| Hello3World
|
|
|
|
2.2 Construct a logical expression to represent each of the following
conditions:
a. x is between 3 and 15 but not equal to 10.
b. x is between 10 and 20 but not odd.
c. y is divisible by 5 but not by 40.
d. str is a lowercase or uppercase letter.
2.3 What is the difference between the following two statements?
a. if (n > 2) { if (n < 6) System.out.println("Done!"); }
else System.out.println("Error");
b. if (n > 2) { if (n < 6) System.out.println("Done!");
else System.out.println("Error"); }
2.4 What is the difference between the result of the following two statements?
a. int cents = (int)(100 * price + 0.5);
b. int cents = (100 * price + 0.5);
12 years ago
999999.99
Answer(0)
Bids(0)
other Questions(10)
- What is a problem with how the American government manages money. with evidence please
- Juvenile justice & delinquancy theory
- PHI 103 Informal Logic (ACL1509I) Week 1 Journal
- Current and Emerging HC IT tools
- Medicare research assignment 5 pages
- networking
- Accounting -1 SOLTIONGURU ONLY
- The Impact of the Cold War in Latin America/Africa/Asia
- micro test all
- Case 3-5 International versus U.S. Standards